package com.ecy.quadratic.fragment.helper;

import android.support.v4.app.Fragment;

import com.ecy.quadratic.ui.fragment.ComicCategoryFragment;
import com.ecy.quadratic.ui.fragment.ComicRecommendFragment;
import com.ecy.quadratic.ui.fragment.ComicUpdateMainFragment;

import java.util.ArrayList;

public class TopTabHelper {

    private ArrayList<String> mTabTextList = new ArrayList<>();
    private Fragment[] fragments;

    {

    }

    public TopTabHelper() {
        mTabTextList.add("更新");
        mTabTextList.add("推荐");
        mTabTextList.add("分类");
        fragments = new Fragment[]{new ComicUpdateMainFragment(), new ComicRecommendFragment(), new ComicCategoryFragment()};
    }

    /***
     * 获得底部所有项 
     */
    public ArrayList<String> getTabTexts() {
        return mTabTextList;
    }

    /*** 
     * 获得所有碎片 
     */
    public Fragment getFramgent(int i) {

        return fragments[i];
    }
}
